package com.beamfield.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class PurchaseOpExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public PurchaseOpExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andPurchaseOpIdIsNull() {
            addCriterion("purchase_op_id is null");
            return (Criteria) this;
        }

        public Criteria andPurchaseOpIdIsNotNull() {
            addCriterion("purchase_op_id is not null");
            return (Criteria) this;
        }

        public Criteria andPurchaseOpIdEqualTo(Long value) {
            addCriterion("purchase_op_id =", value, "purchaseOpId");
            return (Criteria) this;
        }

        public Criteria andPurchaseOpIdNotEqualTo(Long value) {
            addCriterion("purchase_op_id <>", value, "purchaseOpId");
            return (Criteria) this;
        }

        public Criteria andPurchaseOpIdGreaterThan(Long value) {
            addCriterion("purchase_op_id >", value, "purchaseOpId");
            return (Criteria) this;
        }

        public Criteria andPurchaseOpIdGreaterThanOrEqualTo(Long value) {
            addCriterion("purchase_op_id >=", value, "purchaseOpId");
            return (Criteria) this;
        }

        public Criteria andPurchaseOpIdLessThan(Long value) {
            addCriterion("purchase_op_id <", value, "purchaseOpId");
            return (Criteria) this;
        }

        public Criteria andPurchaseOpIdLessThanOrEqualTo(Long value) {
            addCriterion("purchase_op_id <=", value, "purchaseOpId");
            return (Criteria) this;
        }

        public Criteria andPurchaseOpIdIn(List<Long> values) {
            addCriterion("purchase_op_id in", values, "purchaseOpId");
            return (Criteria) this;
        }

        public Criteria andPurchaseOpIdNotIn(List<Long> values) {
            addCriterion("purchase_op_id not in", values, "purchaseOpId");
            return (Criteria) this;
        }

        public Criteria andPurchaseOpIdBetween(Long value1, Long value2) {
            addCriterion("purchase_op_id between", value1, value2, "purchaseOpId");
            return (Criteria) this;
        }

        public Criteria andPurchaseOpIdNotBetween(Long value1, Long value2) {
            addCriterion("purchase_op_id not between", value1, value2, "purchaseOpId");
            return (Criteria) this;
        }

        public Criteria andPurchasePlanIdIsNull() {
            addCriterion("purchase_plan_id is null");
            return (Criteria) this;
        }

        public Criteria andPurchasePlanIdIsNotNull() {
            addCriterion("purchase_plan_id is not null");
            return (Criteria) this;
        }

        public Criteria andPurchasePlanIdEqualTo(Long value) {
            addCriterion("purchase_plan_id =", value, "purchasePlanId");
            return (Criteria) this;
        }

        public Criteria andPurchasePlanIdNotEqualTo(Long value) {
            addCriterion("purchase_plan_id <>", value, "purchasePlanId");
            return (Criteria) this;
        }

        public Criteria andPurchasePlanIdGreaterThan(Long value) {
            addCriterion("purchase_plan_id >", value, "purchasePlanId");
            return (Criteria) this;
        }

        public Criteria andPurchasePlanIdGreaterThanOrEqualTo(Long value) {
            addCriterion("purchase_plan_id >=", value, "purchasePlanId");
            return (Criteria) this;
        }

        public Criteria andPurchasePlanIdLessThan(Long value) {
            addCriterion("purchase_plan_id <", value, "purchasePlanId");
            return (Criteria) this;
        }

        public Criteria andPurchasePlanIdLessThanOrEqualTo(Long value) {
            addCriterion("purchase_plan_id <=", value, "purchasePlanId");
            return (Criteria) this;
        }

        public Criteria andPurchasePlanIdIn(List<Long> values) {
            addCriterion("purchase_plan_id in", values, "purchasePlanId");
            return (Criteria) this;
        }

        public Criteria andPurchasePlanIdNotIn(List<Long> values) {
            addCriterion("purchase_plan_id not in", values, "purchasePlanId");
            return (Criteria) this;
        }

        public Criteria andPurchasePlanIdBetween(Long value1, Long value2) {
            addCriterion("purchase_plan_id between", value1, value2, "purchasePlanId");
            return (Criteria) this;
        }

        public Criteria andPurchasePlanIdNotBetween(Long value1, Long value2) {
            addCriterion("purchase_plan_id not between", value1, value2, "purchasePlanId");
            return (Criteria) this;
        }

        public Criteria andTypeIsNull() {
            addCriterion("type is null");
            return (Criteria) this;
        }

        public Criteria andTypeIsNotNull() {
            addCriterion("type is not null");
            return (Criteria) this;
        }

        public Criteria andTypeEqualTo(Integer value) {
            addCriterion("type =", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotEqualTo(Integer value) {
            addCriterion("type <>", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThan(Integer value) {
            addCriterion("type >", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("type >=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThan(Integer value) {
            addCriterion("type <", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeLessThanOrEqualTo(Integer value) {
            addCriterion("type <=", value, "type");
            return (Criteria) this;
        }

        public Criteria andTypeIn(List<Integer> values) {
            addCriterion("type in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotIn(List<Integer> values) {
            addCriterion("type not in", values, "type");
            return (Criteria) this;
        }

        public Criteria andTypeBetween(Integer value1, Integer value2) {
            addCriterion("type between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("type not between", value1, value2, "type");
            return (Criteria) this;
        }

        public Criteria andOpIsNull() {
            addCriterion("op is null");
            return (Criteria) this;
        }

        public Criteria andOpIsNotNull() {
            addCriterion("op is not null");
            return (Criteria) this;
        }

        public Criteria andOpEqualTo(Integer value) {
            addCriterion("op =", value, "op");
            return (Criteria) this;
        }

        public Criteria andOpNotEqualTo(Integer value) {
            addCriterion("op <>", value, "op");
            return (Criteria) this;
        }

        public Criteria andOpGreaterThan(Integer value) {
            addCriterion("op >", value, "op");
            return (Criteria) this;
        }

        public Criteria andOpGreaterThanOrEqualTo(Integer value) {
            addCriterion("op >=", value, "op");
            return (Criteria) this;
        }

        public Criteria andOpLessThan(Integer value) {
            addCriterion("op <", value, "op");
            return (Criteria) this;
        }

        public Criteria andOpLessThanOrEqualTo(Integer value) {
            addCriterion("op <=", value, "op");
            return (Criteria) this;
        }

        public Criteria andOpIn(List<Integer> values) {
            addCriterion("op in", values, "op");
            return (Criteria) this;
        }

        public Criteria andOpNotIn(List<Integer> values) {
            addCriterion("op not in", values, "op");
            return (Criteria) this;
        }

        public Criteria andOpBetween(Integer value1, Integer value2) {
            addCriterion("op between", value1, value2, "op");
            return (Criteria) this;
        }

        public Criteria andOpNotBetween(Integer value1, Integer value2) {
            addCriterion("op not between", value1, value2, "op");
            return (Criteria) this;
        }

        public Criteria andOpTypeIsNull() {
            addCriterion("op_type is null");
            return (Criteria) this;
        }

        public Criteria andOpTypeIsNotNull() {
            addCriterion("op_type is not null");
            return (Criteria) this;
        }

        public Criteria andOpTypeEqualTo(Integer value) {
            addCriterion("op_type =", value, "opType");
            return (Criteria) this;
        }

        public Criteria andOpTypeNotEqualTo(Integer value) {
            addCriterion("op_type <>", value, "opType");
            return (Criteria) this;
        }

        public Criteria andOpTypeGreaterThan(Integer value) {
            addCriterion("op_type >", value, "opType");
            return (Criteria) this;
        }

        public Criteria andOpTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("op_type >=", value, "opType");
            return (Criteria) this;
        }

        public Criteria andOpTypeLessThan(Integer value) {
            addCriterion("op_type <", value, "opType");
            return (Criteria) this;
        }

        public Criteria andOpTypeLessThanOrEqualTo(Integer value) {
            addCriterion("op_type <=", value, "opType");
            return (Criteria) this;
        }

        public Criteria andOpTypeIn(List<Integer> values) {
            addCriterion("op_type in", values, "opType");
            return (Criteria) this;
        }

        public Criteria andOpTypeNotIn(List<Integer> values) {
            addCriterion("op_type not in", values, "opType");
            return (Criteria) this;
        }

        public Criteria andOpTypeBetween(Integer value1, Integer value2) {
            addCriterion("op_type between", value1, value2, "opType");
            return (Criteria) this;
        }

        public Criteria andOpTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("op_type not between", value1, value2, "opType");
            return (Criteria) this;
        }

        public Criteria andBackReasonIsNull() {
            addCriterion("back_reason is null");
            return (Criteria) this;
        }

        public Criteria andBackReasonIsNotNull() {
            addCriterion("back_reason is not null");
            return (Criteria) this;
        }

        public Criteria andBackReasonEqualTo(String value) {
            addCriterion("back_reason =", value, "backReason");
            return (Criteria) this;
        }

        public Criteria andBackReasonNotEqualTo(String value) {
            addCriterion("back_reason <>", value, "backReason");
            return (Criteria) this;
        }

        public Criteria andBackReasonGreaterThan(String value) {
            addCriterion("back_reason >", value, "backReason");
            return (Criteria) this;
        }

        public Criteria andBackReasonGreaterThanOrEqualTo(String value) {
            addCriterion("back_reason >=", value, "backReason");
            return (Criteria) this;
        }

        public Criteria andBackReasonLessThan(String value) {
            addCriterion("back_reason <", value, "backReason");
            return (Criteria) this;
        }

        public Criteria andBackReasonLessThanOrEqualTo(String value) {
            addCriterion("back_reason <=", value, "backReason");
            return (Criteria) this;
        }

        public Criteria andBackReasonLike(String value) {
            addCriterion("back_reason like", value, "backReason");
            return (Criteria) this;
        }

        public Criteria andBackReasonNotLike(String value) {
            addCriterion("back_reason not like", value, "backReason");
            return (Criteria) this;
        }

        public Criteria andBackReasonIn(List<String> values) {
            addCriterion("back_reason in", values, "backReason");
            return (Criteria) this;
        }

        public Criteria andBackReasonNotIn(List<String> values) {
            addCriterion("back_reason not in", values, "backReason");
            return (Criteria) this;
        }

        public Criteria andBackReasonBetween(String value1, String value2) {
            addCriterion("back_reason between", value1, value2, "backReason");
            return (Criteria) this;
        }

        public Criteria andBackReasonNotBetween(String value1, String value2) {
            addCriterion("back_reason not between", value1, value2, "backReason");
            return (Criteria) this;
        }

        public Criteria andOperatorIsNull() {
            addCriterion("operator is null");
            return (Criteria) this;
        }

        public Criteria andOperatorIsNotNull() {
            addCriterion("operator is not null");
            return (Criteria) this;
        }

        public Criteria andOperatorEqualTo(Long value) {
            addCriterion("operator =", value, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorNotEqualTo(Long value) {
            addCriterion("operator <>", value, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorGreaterThan(Long value) {
            addCriterion("operator >", value, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorGreaterThanOrEqualTo(Long value) {
            addCriterion("operator >=", value, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorLessThan(Long value) {
            addCriterion("operator <", value, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorLessThanOrEqualTo(Long value) {
            addCriterion("operator <=", value, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorIn(List<Long> values) {
            addCriterion("operator in", values, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorNotIn(List<Long> values) {
            addCriterion("operator not in", values, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorBetween(Long value1, Long value2) {
            addCriterion("operator between", value1, value2, "operator");
            return (Criteria) this;
        }

        public Criteria andOperatorNotBetween(Long value1, Long value2) {
            addCriterion("operator not between", value1, value2, "operator");
            return (Criteria) this;
        }

        public Criteria andAddtimeIsNull() {
            addCriterion("addtime is null");
            return (Criteria) this;
        }

        public Criteria andAddtimeIsNotNull() {
            addCriterion("addtime is not null");
            return (Criteria) this;
        }

        public Criteria andAddtimeEqualTo(Date value) {
            addCriterion("addtime =", value, "addtime");
            return (Criteria) this;
        }

        public Criteria andAddtimeNotEqualTo(Date value) {
            addCriterion("addtime <>", value, "addtime");
            return (Criteria) this;
        }

        public Criteria andAddtimeGreaterThan(Date value) {
            addCriterion("addtime >", value, "addtime");
            return (Criteria) this;
        }

        public Criteria andAddtimeGreaterThanOrEqualTo(Date value) {
            addCriterion("addtime >=", value, "addtime");
            return (Criteria) this;
        }

        public Criteria andAddtimeLessThan(Date value) {
            addCriterion("addtime <", value, "addtime");
            return (Criteria) this;
        }

        public Criteria andAddtimeLessThanOrEqualTo(Date value) {
            addCriterion("addtime <=", value, "addtime");
            return (Criteria) this;
        }

        public Criteria andAddtimeIn(List<Date> values) {
            addCriterion("addtime in", values, "addtime");
            return (Criteria) this;
        }

        public Criteria andAddtimeNotIn(List<Date> values) {
            addCriterion("addtime not in", values, "addtime");
            return (Criteria) this;
        }

        public Criteria andAddtimeBetween(Date value1, Date value2) {
            addCriterion("addtime between", value1, value2, "addtime");
            return (Criteria) this;
        }

        public Criteria andAddtimeNotBetween(Date value1, Date value2) {
            addCriterion("addtime not between", value1, value2, "addtime");
            return (Criteria) this;
        }

        public Criteria andBeamIdIsNull() {
            addCriterion("beam_id is null");
            return (Criteria) this;
        }

        public Criteria andBeamIdIsNotNull() {
            addCriterion("beam_id is not null");
            return (Criteria) this;
        }

        public Criteria andBeamIdEqualTo(Long value) {
            addCriterion("beam_id =", value, "beamId");
            return (Criteria) this;
        }

        public Criteria andBeamIdNotEqualTo(Long value) {
            addCriterion("beam_id <>", value, "beamId");
            return (Criteria) this;
        }

        public Criteria andBeamIdGreaterThan(Long value) {
            addCriterion("beam_id >", value, "beamId");
            return (Criteria) this;
        }

        public Criteria andBeamIdGreaterThanOrEqualTo(Long value) {
            addCriterion("beam_id >=", value, "beamId");
            return (Criteria) this;
        }

        public Criteria andBeamIdLessThan(Long value) {
            addCriterion("beam_id <", value, "beamId");
            return (Criteria) this;
        }

        public Criteria andBeamIdLessThanOrEqualTo(Long value) {
            addCriterion("beam_id <=", value, "beamId");
            return (Criteria) this;
        }

        public Criteria andBeamIdIn(List<Long> values) {
            addCriterion("beam_id in", values, "beamId");
            return (Criteria) this;
        }

        public Criteria andBeamIdNotIn(List<Long> values) {
            addCriterion("beam_id not in", values, "beamId");
            return (Criteria) this;
        }

        public Criteria andBeamIdBetween(Long value1, Long value2) {
            addCriterion("beam_id between", value1, value2, "beamId");
            return (Criteria) this;
        }

        public Criteria andBeamIdNotBetween(Long value1, Long value2) {
            addCriterion("beam_id not between", value1, value2, "beamId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}